<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="userService" class="org.wanho.manager.service.impl.UserServiceImpl"></jsp:useBean>
<jsp:include page="hello.jsp"></jsp:include>
<html>
<head>
    <title>文件下载</title>
</head>
<body>
    <h2>方式1：使用物理路径</h2>
    <a href="${pageContext.request.contextPath}/WEB-INF/resource/JSP.pdf">下载课件</a>
    <img src="${pageContext.request.contextPath}/WEB-INF/resource/baidu.png" alt="">

    <h2>方式2：使用流</h2>
    <a href="${pageContext.request.contextPath}/download?fileName=JSP.pdf">下载课件</a>
    <img src="${pageContext.request.contextPath}/download?fileName=baidu.png">

</body>
</html>
